#include <iostream>
#include <cstring>
#include <list>

class Observer;

class Subject
{
public:
    virtual void Attach(Observer* observer){}   // 增加订阅
    virtual void Detach(Observer* observer){}   // 减少订阅
    virtual void Notify(){}     // 通知订阅者

    std::string SubjectState;
};

class Secretary : public Subject {
public:
    // 同事列表
    std::list<Observer*> observers;

public:
    void Attach(Observer *observer);
    void Detach(Observer *observer);
    void Notify();
};
